package com.atguigu.utils.deadLockDemo;

public class deadLock {
    public static void main(String[] args) {

        A a = new A();

        new Thread(() -> {
            try {
                Thread.sleep(300);
                a.a();
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }, "AAA").start();

        new Thread(() -> {
            try {
                Thread.sleep(300);
                a.b();
            } catch (InterruptedException e) {
                throw new RuntimeException(e);
            }
        }, "AAA").start();
    }
}